<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  
</body>
<script>
  // 使用解构赋值，实现两个变量的值的交换
  let a = '123';
  let b = '456';
  let arr = [a,b];
  [b, a] = arr;
  console.log(a, b)
</script>
</html>